<script>
$(function () {
	loadScript();
});
function init() {
	var d = new Date();
	var position = new AMap.LngLat(106.710237, 26.533338);//创建中心点坐标, 贵阳小城故事为中心
	var map = new AMap.Map("mapDiv", {
		center : position
	});
	//加载工具条
	map.plugin([ "AMap.ToolBar", "AMap.OverView", "AMap.Autocomplete", "AMap.CitySearch", "AMap.DragRoute", "AMap.Hotspot","AMap.MapType"],
			function() {
				var tool = new AMap.ToolBar();
				var view = new AMap.OverView();
				type= new AMap.MapType({defaultType:0});//初始状态使用2D地图  
      		    map.addControl(type);  
				map.addControl(tool);
				map.addControl(view); // 鹰眼
			});
	
	
	//var datajson = ;
	createMarkers(${(organ)!"[]"}, map);
}

//异步加载
function loadScript() {
	var script = document.createElement("script");
	script.type = "text/javascript";
	script.src = "http://webapi.amap.com/maps?v=1.2&key=yourkey&callback=init";
	document.body.appendChild(script);
}

function mapFullScreen(){
	window.location.href="${contextPath}mapFullScreen.html";
}
</script>
<div class="pageRight" style="width:930px">
	<form id="queryList">
	<div class="pageRightPath"><a href="${contextPath}index.html" title="">首页</a> > <a href="#" title="" >园区地图</a><a href="javascript:;" onclick="mapFullScreen();" style="float: right;">全屏展示</a></div>
	<div class="pageRightTitle">
		<div class="pageRightSearch">
			<input id="search" name="search" type="text" class="pageRightInput" value="${(search)!''}" onfocus="serchClean();"/>
			<input name="" type="button" class="pageRightBotton" value="搜索" onclick="queryParkMap()"/>
		</div>
	 	<h2>园区地图</h2>
	</div>
	<div id="mapDiv" style="width:99%;height:400px;">没有地图</div>
	<div>使用右上角的地图切换插件进行地图类型切换</div>  
	</form>
</div>
